Integrand size = 41, antiderivative size = 293 \[ \int \cos ^4(c+d x) (a+b \sec (c+d x))^4 \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {1}{8} \left (8 A b^4+16 a^3 b B+32 a b^3 B+24 a^2 b^2 (A+2 C)+a^4 (3 A+4 C)\right ) x+\frac {b^3 (b B+4 a C) \text {arctanh}(\sin (c+d x))}{d}+\frac {a \left (12 A b^3+8 a^3 B+36 a b^2 B+a^2 b (23 A+36 C)\right ) \sin (c+d x)}{12 d}+\frac {\left (4 A b^2+8 a b B+a^2 (3 A+4 C)\right ) \cos (c+d x) (a+b \sec (c+d x))^2 \sin (c+d x)}{8 d}+\frac {(A b+a B) \cos ^2(c+d x) (a+b \sec (c+d x))^3 \sin (c+d x)}{3 d}+\frac {A \cos ^3(c+d x) (a+b \sec (c+d x))^4 \sin (c+d x)}{4 d}-\frac {b^2 \left (32 a b B+2 b^2 (13 A-12 C)+3 a^2 (3 A+4 C)\right ) \tan (c+d x)}{24 d} \]
1/8*(8*A*b^4+16*B*a^3*b+32*B*a*b^3+24*a^2*b^2*(A+2*C)+a^4*(3*A+4*C))*x+b^3 *(B*b+4*C*a)*arctanh(sin(d*x+c))/d+1/12*a*(12*A*b^3+8*B*a^3+36*B*a*b^2+a^2 *b*(23*A+36*C))*sin(d*x+c)/d+1/8*(4*A*b^2+8*B*a*b+a^2*(3*A+4*C))*cos(d*x+c )*(a+b*sec(d*x+c))^2*sin(d*x+c)/d+1/3*(A*b+B*a)*cos(d*x+c)^2*(a+b*sec(d*x+ c))^3*sin(d*x+c)/d+1/4*A*cos(d*x+c)^3*(a+b*sec(d*x+c))^4*sin(d*x+c)/d-1/24 *b^2*(32*B*a*b+2*b^2*(13*A-12*C)+3*a^2*(3*A+4*C))*tan(d*x+c)/d
Time = 6.85 (sec) , antiderivative size = 382, normalized size of antiderivative = 1.30 \[ \int \cos ^4(c+d x) (a+b \sec (c+d x))^4 \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {32 a \left (24 A b^3+5 a^3 B+36 a b^2 B+4 a^2 b (5 A+6 C)\right ) \sin (c+d x)+a^2 \sec (c+d x) \left (3 \left (48 A b^2+32 a b B+a^2 (9 A+8 C)\right ) \sin (3 (c+d x))+a (8 (4 A b+a B) \sin (4 (c+d x))+3 a A \sin (5 (c+d x)))\right )+24 \left (3 a^4 A c+24 a^2 A b^2 c+8 A b^4 c+16 a^3 b B c+32 a b^3 B c+4 a^4 c C+48 a^2 b^2 c C+3 a^4 A d x+24 a^2 A b^2 d x+8 A b^4 d x+16 a^3 b B d x+32 a b^3 B d x+4 a^4 C d x+48 a^2 b^2 C d x-8 b^3 (b B+4 a C) \log \left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )+8 b^4 B \log \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )+32 a b^3 C \log \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )+\left (6 a^2 A b^2+4 a^3 b B+8 b^4 C+a^4 (A+C)\right ) \tan (c+d x)\right )}{192 d} \]
(32*a*(24*A*b^3 + 5*a^3*B + 36*a*b^2*B + 4*a^2*b*(5*A + 6*C))*Sin[c + d*x] + a^2*Sec[c + d*x]*(3*(48*A*b^2 + 32*a*b*B + a^2*(9*A + 8*C))*Sin[3*(c + d*x)] + a*(8*(4*A*b + a*B)*Sin[4*(c + d*x)] + 3*a*A*Sin[5*(c + d*x)])) + 2 4*(3*a^4*A*c + 24*a^2*A*b^2*c + 8*A*b^4*c + 16*a^3*b*B*c + 32*a*b^3*B*c + 4*a^4*c*C + 48*a^2*b^2*c*C + 3*a^4*A*d*x + 24*a^2*A*b^2*d*x + 8*A*b^4*d*x + 16*a^3*b*B*d*x + 32*a*b^3*B*d*x + 4*a^4*C*d*x + 48*a^2*b^2*C*d*x - 8*b^3 *(b*B + 4*a*C)*Log[Cos[(c + d*x)/2] - Sin[(c + d*x)/2]] + 8*b^4*B*Log[Cos[ (c + d*x)/2] + Sin[(c + d*x)/2]] + 32*a*b^3*C*Log[Cos[(c + d*x)/2] + Sin[( c + d*x)/2]] + (6*a^2*A*b^2 + 4*a^3*b*B + 8*b^4*C + a^4*(A + C))*Tan[c + d *x]))/(192*d)
Time = 2.20 (sec) , antiderivative size = 303, normalized size of antiderivative = 1.03, number of steps used = 15, number of rules used = 15, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.366, Rules used = {3042, 4582, 3042, 4582, 3042, 4582, 3042, 4564, 3042, 4535, 24, 3042, 4533, 3042, 4257}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \cos ^4(c+d x) (a+b \sec (c+d x))^4 \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\left (a+b \csc \left (c+d x+\frac {\pi }{2}\right )\right )^4 \left (A+B \csc \left (c+d x+\frac {\pi }{2}\right )+C \csc \left (c+d x+\frac {\pi }{2}\right )^2\right )}{\csc \left (c+d x+\frac {\pi }{2}\right )^4}dx\) |
\(\Big \downarrow \) 4582 |
\(\displaystyle \frac {1}{4} \int \cos ^3(c+d x) (a+b \sec (c+d x))^3 \left (-b (A-4 C) \sec ^2(c+d x)+(3 a A+4 b B+4 a C) \sec (c+d x)+4 (A b+a B)\right )dx+\frac {A \sin (c+d x) \cos ^3(c+d x) (a+b \sec (c+d x))^4}{4 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{4} \int \frac {\left (a+b \csc \left (c+d x+\frac {\pi }{2}\right )\right )^3 \left (-b (A-4 C) \csc \left (c+d x+\frac {\pi }{2}\right )^2+(3 a A+4 b B+4 a C) \csc \left (c+d x+\frac {\pi }{2}\right )+4 (A b+a B)\right )}{\csc \left (c+d x+\frac {\pi }{2}\right )^3}dx+\frac {A \sin (c+d x) \cos ^3(c+d x) (a+b \sec (c+d x))^4}{4 d}\) |
\(\Big \downarrow \) 4582 |
\(\displaystyle \frac {1}{4} \left (\frac {1}{3} \int \cos ^2(c+d x) (a+b \sec (c+d x))^2 \left (-b (7 A b-12 C b+4 a B) \sec ^2(c+d x)+2 \left (4 B a^2+b (7 A+12 C) a+6 b^2 B\right ) \sec (c+d x)+3 \left ((3 A+4 C) a^2+8 b B a+4 A b^2\right )\right )dx+\frac {4 (a B+A b) \sin (c+d x) \cos ^2(c+d x) (a+b \sec (c+d x))^3}{3 d}\right )+\frac {A \sin (c+d x) \cos ^3(c+d x) (a+b \sec (c+d x))^4}{4 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{4} \left (\frac {1}{3} \int \frac {\left (a+b \csc \left (c+d x+\frac {\pi }{2}\right )\right )^2 \left (-b (7 A b-12 C b+4 a B) \csc \left (c+d x+\frac {\pi }{2}\right )^2+2 \left (4 B a^2+b (7 A+12 C) a+6 b^2 B\right ) \csc \left (c+d x+\frac {\pi }{2}\right )+3 \left ((3 A+4 C) a^2+8 b B a+4 A b^2\right )\right )}{\csc \left (c+d x+\frac {\pi }{2}\right )^2}dx+\frac {4 (a B+A b) \sin (c+d x) \cos ^2(c+d x) (a+b \sec (c+d x))^3}{3 d}\right )+\frac {A \sin (c+d x) \cos ^3(c+d x) (a+b \sec (c+d x))^4}{4 d}\) |
\(\Big \downarrow \) 4582 |
\(\displaystyle \frac {1}{4} \left (\frac {1}{3} \left (\frac {1}{2} \int \cos (c+d x) (a+b \sec (c+d x)) \left (-b \left (3 (3 A+4 C) a^2+32 b B a+2 b^2 (13 A-12 C)\right ) \sec ^2(c+d x)+\left (3 (3 A+4 C) a^3+32 b B a^2+2 b^2 (13 A+36 C) a+24 b^3 B\right ) \sec (c+d x)+2 \left (8 B a^3+\frac {1}{2} (46 A b+72 C b) a^2+36 b^2 B a+12 A b^3\right )\right )dx+\frac {3 \sin (c+d x) \cos (c+d x) \left (a^2 (3 A+4 C)+8 a b B+4 A b^2\right ) (a+b \sec (c+d x))^2}{2 d}\right )+\frac {4 (a B+A b) \sin (c+d x) \cos ^2(c+d x) (a+b \sec (c+d x))^3}{3 d}\right )+\frac {A \sin (c+d x) \cos ^3(c+d x) (a+b \sec (c+d x))^4}{4 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{4} \left (\frac {1}{3} \left (\frac {1}{2} \int \frac {\left (a+b \csc \left (c+d x+\frac {\pi }{2}\right )\right ) \left (-b \left (3 (3 A+4 C) a^2+32 b B a+2 b^2 (13 A-12 C)\right ) \csc \left (c+d x+\frac {\pi }{2}\right )^2+\left (3 (3 A+4 C) a^3+32 b B a^2+2 b^2 (13 A+36 C) a+24 b^3 B\right ) \csc \left (c+d x+\frac {\pi }{2}\right )+2 \left (8 B a^3+\frac {1}{2} (46 A b+72 C b) a^2+36 b^2 B a+12 A b^3\right )\right )}{\csc \left (c+d x+\frac {\pi }{2}\right )}dx+\frac {3 \sin (c+d x) \cos (c+d x) \left (a^2 (3 A+4 C)+8 a b B+4 A b^2\right ) (a+b \sec (c+d x))^2}{2 d}\right )+\frac {4 (a B+A b) \sin (c+d x) \cos ^2(c+d x) (a+b \sec (c+d x))^3}{3 d}\right )+\frac {A \sin (c+d x) \cos ^3(c+d x) (a+b \sec (c+d x))^4}{4 d}\) |
\(\Big \downarrow \) 4564 |
\(\displaystyle \frac {1}{4} \left (\frac {1}{3} \left (\frac {1}{2} \left (\int \cos (c+d x) \left (24 (b B+4 a C) \sec ^2(c+d x) b^3+2 a \left (8 B a^3+b (23 A+36 C) a^2+36 b^2 B a+12 A b^3\right )+3 \left ((3 A+4 C) a^4+16 b B a^3+24 b^2 (A+2 C) a^2+32 b^3 B a+8 A b^4\right ) \sec (c+d x)\right )dx-\frac {b^2 \tan (c+d x) \left (3 a^2 (3 A+4 C)+32 a b B+2 b^2 (13 A-12 C)\right )}{d}\right )+\frac {3 \sin (c+d x) \cos (c+d x) \left (a^2 (3 A+4 C)+8 a b B+4 A b^2\right ) (a+b \sec (c+d x))^2}{2 d}\right )+\frac {4 (a B+A b) \sin (c+d x) \cos ^2(c+d x) (a+b \sec (c+d x))^3}{3 d}\right )+\frac {A \sin (c+d x) \cos ^3(c+d x) (a+b \sec (c+d x))^4}{4 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{4} \left (\frac {1}{3} \left (\frac {1}{2} \left (\int \frac {24 (b B+4 a C) \csc \left (c+d x+\frac {\pi }{2}\right )^2 b^3+2 a \left (8 B a^3+b (23 A+36 C) a^2+36 b^2 B a+12 A b^3\right )+3 \left ((3 A+4 C) a^4+16 b B a^3+24 b^2 (A+2 C) a^2+32 b^3 B a+8 A b^4\right ) \csc \left (c+d x+\frac {\pi }{2}\right )}{\csc \left (c+d x+\frac {\pi }{2}\right )}dx-\frac {b^2 \tan (c+d x) \left (3 a^2 (3 A+4 C)+32 a b B+2 b^2 (13 A-12 C)\right )}{d}\right )+\frac {3 \sin (c+d x) \cos (c+d x) \left (a^2 (3 A+4 C)+8 a b B+4 A b^2\right ) (a+b \sec (c+d x))^2}{2 d}\right )+\frac {4 (a B+A b) \sin (c+d x) \cos ^2(c+d x) (a+b \sec (c+d x))^3}{3 d}\right )+\frac {A \sin (c+d x) \cos ^3(c+d x) (a+b \sec (c+d x))^4}{4 d}\) |
\(\Big \downarrow \) 4535 |
\(\displaystyle \frac {1}{4} \left (\frac {1}{3} \left (\frac {1}{2} \left (\int \cos (c+d x) \left (24 (b B+4 a C) \sec ^2(c+d x) b^3+2 a \left (8 B a^3+b (23 A+36 C) a^2+36 b^2 B a+12 A b^3\right )\right )dx+3 \left (a^4 (3 A+4 C)+16 a^3 b B+24 a^2 b^2 (A+2 C)+32 a b^3 B+8 A b^4\right ) \int 1dx-\frac {b^2 \tan (c+d x) \left (3 a^2 (3 A+4 C)+32 a b B+2 b^2 (13 A-12 C)\right )}{d}\right )+\frac {3 \sin (c+d x) \cos (c+d x) \left (a^2 (3 A+4 C)+8 a b B+4 A b^2\right ) (a+b \sec (c+d x))^2}{2 d}\right )+\frac {4 (a B+A b) \sin (c+d x) \cos ^2(c+d x) (a+b \sec (c+d x))^3}{3 d}\right )+\frac {A \sin (c+d x) \cos ^3(c+d x) (a+b \sec (c+d x))^4}{4 d}\) |
\(\Big \downarrow \) 24 |
\(\displaystyle \frac {1}{4} \left (\frac {1}{3} \left (\frac {1}{2} \left (\int \cos (c+d x) \left (24 (b B+4 a C) \sec ^2(c+d x) b^3+2 a \left (8 B a^3+b (23 A+36 C) a^2+36 b^2 B a+12 A b^3\right )\right )dx-\frac {b^2 \tan (c+d x) \left (3 a^2 (3 A+4 C)+32 a b B+2 b^2 (13 A-12 C)\right )}{d}+3 x \left (a^4 (3 A+4 C)+16 a^3 b B+24 a^2 b^2 (A+2 C)+32 a b^3 B+8 A b^4\right )\right )+\frac {3 \sin (c+d x) \cos (c+d x) \left (a^2 (3 A+4 C)+8 a b B+4 A b^2\right ) (a+b \sec (c+d x))^2}{2 d}\right )+\frac {4 (a B+A b) \sin (c+d x) \cos ^2(c+d x) (a+b \sec (c+d x))^3}{3 d}\right )+\frac {A \sin (c+d x) \cos ^3(c+d x) (a+b \sec (c+d x))^4}{4 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{4} \left (\frac {1}{3} \left (\frac {1}{2} \left (\int \frac {24 (b B+4 a C) \csc \left (c+d x+\frac {\pi }{2}\right )^2 b^3+2 a \left (8 B a^3+b (23 A+36 C) a^2+36 b^2 B a+12 A b^3\right )}{\csc \left (c+d x+\frac {\pi }{2}\right )}dx-\frac {b^2 \tan (c+d x) \left (3 a^2 (3 A+4 C)+32 a b B+2 b^2 (13 A-12 C)\right )}{d}+3 x \left (a^4 (3 A+4 C)+16 a^3 b B+24 a^2 b^2 (A+2 C)+32 a b^3 B+8 A b^4\right )\right )+\frac {3 \sin (c+d x) \cos (c+d x) \left (a^2 (3 A+4 C)+8 a b B+4 A b^2\right ) (a+b \sec (c+d x))^2}{2 d}\right )+\frac {4 (a B+A b) \sin (c+d x) \cos ^2(c+d x) (a+b \sec (c+d x))^3}{3 d}\right )+\frac {A \sin (c+d x) \cos ^3(c+d x) (a+b \sec (c+d x))^4}{4 d}\) |
\(\Big \downarrow \) 4533 |
\(\displaystyle \frac {1}{4} \left (\frac {1}{3} \left (\frac {1}{2} \left (24 b^3 (4 a C+b B) \int \sec (c+d x)dx-\frac {b^2 \tan (c+d x) \left (3 a^2 (3 A+4 C)+32 a b B+2 b^2 (13 A-12 C)\right )}{d}+\frac {2 a \sin (c+d x) \left (8 a^3 B+a^2 b (23 A+36 C)+36 a b^2 B+12 A b^3\right )}{d}+3 x \left (a^4 (3 A+4 C)+16 a^3 b B+24 a^2 b^2 (A+2 C)+32 a b^3 B+8 A b^4\right )\right )+\frac {3 \sin (c+d x) \cos (c+d x) \left (a^2 (3 A+4 C)+8 a b B+4 A b^2\right ) (a+b \sec (c+d x))^2}{2 d}\right )+\frac {4 (a B+A b) \sin (c+d x) \cos ^2(c+d x) (a+b \sec (c+d x))^3}{3 d}\right )+\frac {A \sin (c+d x) \cos ^3(c+d x) (a+b \sec (c+d x))^4}{4 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{4} \left (\frac {1}{3} \left (\frac {1}{2} \left (24 b^3 (4 a C+b B) \int \csc \left (c+d x+\frac {\pi }{2}\right )dx-\frac {b^2 \tan (c+d x) \left (3 a^2 (3 A+4 C)+32 a b B+2 b^2 (13 A-12 C)\right )}{d}+\frac {2 a \sin (c+d x) \left (8 a^3 B+a^2 b (23 A+36 C)+36 a b^2 B+12 A b^3\right )}{d}+3 x \left (a^4 (3 A+4 C)+16 a^3 b B+24 a^2 b^2 (A+2 C)+32 a b^3 B+8 A b^4\right )\right )+\frac {3 \sin (c+d x) \cos (c+d x) \left (a^2 (3 A+4 C)+8 a b B+4 A b^2\right ) (a+b \sec (c+d x))^2}{2 d}\right )+\frac {4 (a B+A b) \sin (c+d x) \cos ^2(c+d x) (a+b \sec (c+d x))^3}{3 d}\right )+\frac {A \sin (c+d x) \cos ^3(c+d x) (a+b \sec (c+d x))^4}{4 d}\) |
\(\Big \downarrow \) 4257 |
\(\displaystyle \frac {1}{4} \left (\frac {1}{3} \left (\frac {3 \sin (c+d x) \cos (c+d x) \left (a^2 (3 A+4 C)+8 a b B+4 A b^2\right ) (a+b \sec (c+d x))^2}{2 d}+\frac {1}{2} \left (-\frac {b^2 \tan (c+d x) \left (3 a^2 (3 A+4 C)+32 a b B+2 b^2 (13 A-12 C)\right )}{d}+\frac {2 a \sin (c+d x) \left (8 a^3 B+a^2 b (23 A+36 C)+36 a b^2 B+12 A b^3\right )}{d}+3 x \left (a^4 (3 A+4 C)+16 a^3 b B+24 a^2 b^2 (A+2 C)+32 a b^3 B+8 A b^4\right )+\frac {24 b^3 (4 a C+b B) \text {arctanh}(\sin (c+d x))}{d}\right )\right )+\frac {4 (a B+A b) \sin (c+d x) \cos ^2(c+d x) (a+b \sec (c+d x))^3}{3 d}\right )+\frac {A \sin (c+d x) \cos ^3(c+d x) (a+b \sec (c+d x))^4}{4 d}\) |
(A*Cos[c + d*x]^3*(a + b*Sec[c + d*x])^4*Sin[c + d*x])/(4*d) + ((4*(A*b + a*B)*Cos[c + d*x]^2*(a + b*Sec[c + d*x])^3*Sin[c + d*x])/(3*d) + ((3*(4*A* b^2 + 8*a*b*B + a^2*(3*A + 4*C))*Cos[c + d*x]*(a + b*Sec[c + d*x])^2*Sin[c + d*x])/(2*d) + (3*(8*A*b^4 + 16*a^3*b*B + 32*a*b^3*B + 24*a^2*b^2*(A + 2 *C) + a^4*(3*A + 4*C))*x + (24*b^3*(b*B + 4*a*C)*ArcTanh[Sin[c + d*x]])/d + (2*a*(12*A*b^3 + 8*a^3*B + 36*a*b^2*B + a^2*b*(23*A + 36*C))*Sin[c + d*x ])/d - (b^2*(32*a*b*B + 2*b^2*(13*A - 12*C) + 3*a^2*(3*A + 4*C))*Tan[c + d *x])/d)/2)/3)/4
3.9.93.3.1 Defintions of rubi rules used
Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]
Int[(csc[(e_.) + (f_.)*(x_)]*(b_.))^(m_.)*(csc[(e_.) + (f_.)*(x_)]^2*(C_.) + (A_)), x_Symbol] :> Simp[A*Cot[e + f*x]*((b*Csc[e + f*x])^m/(f*m)), x] + Simp[(C*m + A*(m + 1))/(b^2*m) Int[(b*Csc[e + f*x])^(m + 2), x], x] /; Fr eeQ[{b, e, f, A, C}, x] && NeQ[C*m + A*(m + 1), 0] && LeQ[m, -1]
Int[(csc[(e_.) + (f_.)*(x_)]*(b_.))^(m_.)*((A_.) + csc[(e_.) + (f_.)*(x_)]* (B_.) + csc[(e_.) + (f_.)*(x_)]^2*(C_.)), x_Symbol] :> Simp[B/b Int[(b*Cs c[e + f*x])^(m + 1), x], x] + Int[(b*Csc[e + f*x])^m*(A + C*Csc[e + f*x]^2) , x] /; FreeQ[{b, e, f, A, B, C, m}, x]
Int[((A_.) + csc[(e_.) + (f_.)*(x_)]*(B_.) + csc[(e_.) + (f_.)*(x_)]^2*(C_. ))*(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_.)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + ( a_)), x_Symbol] :> Simp[(-b)*C*Csc[e + f*x]*Cot[e + f*x]*((d*Csc[e + f*x])^ n/(f*(n + 2))), x] + Simp[1/(n + 2) Int[(d*Csc[e + f*x])^n*Simp[A*a*(n + 2) + (B*a*(n + 2) + b*(C*(n + 1) + A*(n + 2)))*Csc[e + f*x] + (a*C + B*b)*( n + 2)*Csc[e + f*x]^2, x], x], x] /; FreeQ[{a, b, d, e, f, A, B, C, n}, x] && !LtQ[n, -1]
Int[((A_.) + csc[(e_.) + (f_.)*(x_)]*(B_.) + csc[(e_.) + (f_.)*(x_)]^2*(C_. ))*(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a _))^(m_), x_Symbol] :> Simp[A*Cot[e + f*x]*(a + b*Csc[e + f*x])^m*((d*Csc[e + f*x])^n/(f*n)), x] - Simp[1/(d*n) Int[(a + b*Csc[e + f*x])^(m - 1)*(d* Csc[e + f*x])^(n + 1)*Simp[A*b*m - a*B*n - (b*B*n + a*(C*n + A*(n + 1)))*Cs c[e + f*x] - b*(C*n + A*(m + n + 1))*Csc[e + f*x]^2, x], x], x] /; FreeQ[{a , b, d, e, f, A, B, C}, x] && NeQ[a^2 - b^2, 0] && GtQ[m, 0] && LeQ[n, -1]
Time = 1.06 (sec) , antiderivative size = 287, normalized size of antiderivative = 0.98
method | result | size |
parallelrisch | \(\frac {-192 b^{3} \cos \left (d x +c \right ) \left (B b +4 C a \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )+192 b^{3} \cos \left (d x +c \right ) \left (B b +4 C a \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )+320 \left (\frac {B \,a^{3}}{4}+b \left (A +\frac {6 C}{5}\right ) a^{2}+\frac {9 B a \,b^{2}}{5}+\frac {6 A \,b^{3}}{5}\right ) a \sin \left (2 d x +2 c \right )+\left (\left (27 A +24 C \right ) a^{4}+96 B \,a^{3} b +144 A \,a^{2} b^{2}\right ) \sin \left (3 d x +3 c \right )+\left (32 A \,a^{3} b +8 B \,a^{4}\right ) \sin \left (4 d x +4 c \right )+3 a^{4} A \sin \left (5 d x +5 c \right )+72 d x \left (\left (A +\frac {4 C}{3}\right ) a^{4}+\frac {16 B \,a^{3} b}{3}+8 a^{2} b^{2} \left (A +2 C \right )+\frac {32 B a \,b^{3}}{3}+\frac {8 A \,b^{4}}{3}\right ) \cos \left (d x +c \right )+24 \sin \left (d x +c \right ) \left (\left (A +C \right ) a^{4}+4 B \,a^{3} b +6 A \,a^{2} b^{2}+8 C \,b^{4}\right )}{192 d \cos \left (d x +c \right )}\) | \(287\) |
derivativedivides | \(\frac {a^{4} A \left (\frac {\left (\cos \left (d x +c \right )^{3}+\frac {3 \cos \left (d x +c \right )}{2}\right ) \sin \left (d x +c \right )}{4}+\frac {3 d x}{8}+\frac {3 c}{8}\right )+\frac {B \,a^{4} \left (2+\cos \left (d x +c \right )^{2}\right ) \sin \left (d x +c \right )}{3}+a^{4} C \left (\frac {\sin \left (d x +c \right ) \cos \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+\frac {4 A \,a^{3} b \left (2+\cos \left (d x +c \right )^{2}\right ) \sin \left (d x +c \right )}{3}+4 B \,a^{3} b \left (\frac {\sin \left (d x +c \right ) \cos \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+4 a^{3} b C \sin \left (d x +c \right )+6 A \,a^{2} b^{2} \left (\frac {\sin \left (d x +c \right ) \cos \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+6 B \,a^{2} b^{2} \sin \left (d x +c \right )+6 C \,a^{2} b^{2} \left (d x +c \right )+4 a A \,b^{3} \sin \left (d x +c \right )+4 B a \,b^{3} \left (d x +c \right )+4 C a \,b^{3} \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )+A \,b^{4} \left (d x +c \right )+B \,b^{4} \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )+C \tan \left (d x +c \right ) b^{4}}{d}\) | \(304\) |
default | \(\frac {a^{4} A \left (\frac {\left (\cos \left (d x +c \right )^{3}+\frac {3 \cos \left (d x +c \right )}{2}\right ) \sin \left (d x +c \right )}{4}+\frac {3 d x}{8}+\frac {3 c}{8}\right )+\frac {B \,a^{4} \left (2+\cos \left (d x +c \right )^{2}\right ) \sin \left (d x +c \right )}{3}+a^{4} C \left (\frac {\sin \left (d x +c \right ) \cos \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+\frac {4 A \,a^{3} b \left (2+\cos \left (d x +c \right )^{2}\right ) \sin \left (d x +c \right )}{3}+4 B \,a^{3} b \left (\frac {\sin \left (d x +c \right ) \cos \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+4 a^{3} b C \sin \left (d x +c \right )+6 A \,a^{2} b^{2} \left (\frac {\sin \left (d x +c \right ) \cos \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+6 B \,a^{2} b^{2} \sin \left (d x +c \right )+6 C \,a^{2} b^{2} \left (d x +c \right )+4 a A \,b^{3} \sin \left (d x +c \right )+4 B a \,b^{3} \left (d x +c \right )+4 C a \,b^{3} \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )+A \,b^{4} \left (d x +c \right )+B \,b^{4} \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )+C \tan \left (d x +c \right ) b^{4}}{d}\) | \(304\) |
risch | \(\frac {a^{4} A \sin \left (4 d x +4 c \right )}{32 d}+\frac {\sin \left (3 d x +3 c \right ) A \,a^{3} b}{3 d}-\frac {3 i A \,a^{3} b \,{\mathrm e}^{i \left (d x +c \right )}}{2 d}+\frac {3 i A \,a^{3} b \,{\mathrm e}^{-i \left (d x +c \right )}}{2 d}-\frac {2 i {\mathrm e}^{i \left (d x +c \right )} a^{3} b C}{d}+\frac {2 i {\mathrm e}^{-i \left (d x +c \right )} a A \,b^{3}}{d}+\frac {3 i {\mathrm e}^{-i \left (d x +c \right )} B \,a^{2} b^{2}}{d}+x A \,b^{4}-\frac {i a^{4} A \,{\mathrm e}^{2 i \left (d x +c \right )}}{8 d}+\frac {2 i {\mathrm e}^{-i \left (d x +c \right )} a^{3} b C}{d}+\frac {3 i {\mathrm e}^{-2 i \left (d x +c \right )} A \,a^{2} b^{2}}{4 d}+\frac {i {\mathrm e}^{-2 i \left (d x +c \right )} B \,a^{3} b}{2 d}-\frac {3 i {\mathrm e}^{2 i \left (d x +c \right )} A \,a^{2} b^{2}}{4 d}-\frac {i {\mathrm e}^{2 i \left (d x +c \right )} B \,a^{3} b}{2 d}-\frac {2 i {\mathrm e}^{i \left (d x +c \right )} a A \,b^{3}}{d}-\frac {3 i {\mathrm e}^{i \left (d x +c \right )} B \,a^{2} b^{2}}{d}+\frac {3 a^{4} A x}{8}+\frac {a^{4} x C}{2}+\frac {\sin \left (3 d x +3 c \right ) B \,a^{4}}{12 d}+4 x B a \,b^{3}+6 x C \,a^{2} b^{2}-\frac {i {\mathrm e}^{2 i \left (d x +c \right )} a^{4} C}{8 d}+\frac {i {\mathrm e}^{-2 i \left (d x +c \right )} a^{4} C}{8 d}+\frac {i a^{4} A \,{\mathrm e}^{-2 i \left (d x +c \right )}}{8 d}+2 B \,a^{3} b x +\frac {2 i C \,b^{4}}{d \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )}+\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) B \,b^{4}}{d}-\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) B \,b^{4}}{d}-\frac {3 i {\mathrm e}^{i \left (d x +c \right )} B \,a^{4}}{8 d}+\frac {3 i {\mathrm e}^{-i \left (d x +c \right )} B \,a^{4}}{8 d}+3 A \,a^{2} b^{2} x +\frac {4 a \,b^{3} \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) C}{d}-\frac {4 a \,b^{3} \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) C}{d}\) | \(587\) |
1/192*(-192*b^3*cos(d*x+c)*(B*b+4*C*a)*ln(tan(1/2*d*x+1/2*c)-1)+192*b^3*co s(d*x+c)*(B*b+4*C*a)*ln(tan(1/2*d*x+1/2*c)+1)+320*(1/4*B*a^3+b*(A+6/5*C)*a ^2+9/5*B*a*b^2+6/5*A*b^3)*a*sin(2*d*x+2*c)+((27*A+24*C)*a^4+96*B*a^3*b+144 *A*a^2*b^2)*sin(3*d*x+3*c)+(32*A*a^3*b+8*B*a^4)*sin(4*d*x+4*c)+3*a^4*A*sin (5*d*x+5*c)+72*d*x*((A+4/3*C)*a^4+16/3*B*a^3*b+8*a^2*b^2*(A+2*C)+32/3*B*a* b^3+8/3*A*b^4)*cos(d*x+c)+24*sin(d*x+c)*((A+C)*a^4+4*B*a^3*b+6*A*a^2*b^2+8 *C*b^4))/d/cos(d*x+c)
Time = 0.31 (sec) , antiderivative size = 263, normalized size of antiderivative = 0.90 \[ \int \cos ^4(c+d x) (a+b \sec (c+d x))^4 \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {3 \, {\left ({\left (3 \, A + 4 \, C\right )} a^{4} + 16 \, B a^{3} b + 24 \, {\left (A + 2 \, C\right )} a^{2} b^{2} + 32 \, B a b^{3} + 8 \, A b^{4}\right )} d x \cos \left (d x + c\right ) + 12 \, {\left (4 \, C a b^{3} + B b^{4}\right )} \cos \left (d x + c\right ) \log \left (\sin \left (d x + c\right ) + 1\right ) - 12 \, {\left (4 \, C a b^{3} + B b^{4}\right )} \cos \left (d x + c\right ) \log \left (-\sin \left (d x + c\right ) + 1\right ) + {\left (6 \, A a^{4} \cos \left (d x + c\right )^{4} + 24 \, C b^{4} + 8 \, {\left (B a^{4} + 4 \, A a^{3} b\right )} \cos \left (d x + c\right )^{3} + 3 \, {\left ({\left (3 \, A + 4 \, C\right )} a^{4} + 16 \, B a^{3} b + 24 \, A a^{2} b^{2}\right )} \cos \left (d x + c\right )^{2} + 16 \, {\left (B a^{4} + 2 \, {\left (2 \, A + 3 \, C\right )} a^{3} b + 9 \, B a^{2} b^{2} + 6 \, A a b^{3}\right )} \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )}{24 \, d \cos \left (d x + c\right )} \]
integrate(cos(d*x+c)^4*(a+b*sec(d*x+c))^4*(A+B*sec(d*x+c)+C*sec(d*x+c)^2), x, algorithm="fricas")
1/24*(3*((3*A + 4*C)*a^4 + 16*B*a^3*b + 24*(A + 2*C)*a^2*b^2 + 32*B*a*b^3 + 8*A*b^4)*d*x*cos(d*x + c) + 12*(4*C*a*b^3 + B*b^4)*cos(d*x + c)*log(sin( d*x + c) + 1) - 12*(4*C*a*b^3 + B*b^4)*cos(d*x + c)*log(-sin(d*x + c) + 1) + (6*A*a^4*cos(d*x + c)^4 + 24*C*b^4 + 8*(B*a^4 + 4*A*a^3*b)*cos(d*x + c) ^3 + 3*((3*A + 4*C)*a^4 + 16*B*a^3*b + 24*A*a^2*b^2)*cos(d*x + c)^2 + 16*( B*a^4 + 2*(2*A + 3*C)*a^3*b + 9*B*a^2*b^2 + 6*A*a*b^3)*cos(d*x + c))*sin(d *x + c))/(d*cos(d*x + c))
Timed out. \[ \int \cos ^4(c+d x) (a+b \sec (c+d x))^4 \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\text {Timed out} \]
Time = 0.23 (sec) , antiderivative size = 305, normalized size of antiderivative = 1.04 \[ \int \cos ^4(c+d x) (a+b \sec (c+d x))^4 \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {3 \, {\left (12 \, d x + 12 \, c + \sin \left (4 \, d x + 4 \, c\right ) + 8 \, \sin \left (2 \, d x + 2 \, c\right )\right )} A a^{4} - 32 \, {\left (\sin \left (d x + c\right )^{3} - 3 \, \sin \left (d x + c\right )\right )} B a^{4} + 24 \, {\left (2 \, d x + 2 \, c + \sin \left (2 \, d x + 2 \, c\right )\right )} C a^{4} - 128 \, {\left (\sin \left (d x + c\right )^{3} - 3 \, \sin \left (d x + c\right )\right )} A a^{3} b + 96 \, {\left (2 \, d x + 2 \, c + \sin \left (2 \, d x + 2 \, c\right )\right )} B a^{3} b + 144 \, {\left (2 \, d x + 2 \, c + \sin \left (2 \, d x + 2 \, c\right )\right )} A a^{2} b^{2} + 576 \, {\left (d x + c\right )} C a^{2} b^{2} + 384 \, {\left (d x + c\right )} B a b^{3} + 96 \, {\left (d x + c\right )} A b^{4} + 192 \, C a b^{3} {\left (\log \left (\sin \left (d x + c\right ) + 1\right ) - \log \left (\sin \left (d x + c\right ) - 1\right )\right )} + 48 \, B b^{4} {\left (\log \left (\sin \left (d x + c\right ) + 1\right ) - \log \left (\sin \left (d x + c\right ) - 1\right )\right )} + 384 \, C a^{3} b \sin \left (d x + c\right ) + 576 \, B a^{2} b^{2} \sin \left (d x + c\right ) + 384 \, A a b^{3} \sin \left (d x + c\right ) + 96 \, C b^{4} \tan \left (d x + c\right )}{96 \, d} \]
integrate(cos(d*x+c)^4*(a+b*sec(d*x+c))^4*(A+B*sec(d*x+c)+C*sec(d*x+c)^2), x, algorithm="maxima")
1/96*(3*(12*d*x + 12*c + sin(4*d*x + 4*c) + 8*sin(2*d*x + 2*c))*A*a^4 - 32 *(sin(d*x + c)^3 - 3*sin(d*x + c))*B*a^4 + 24*(2*d*x + 2*c + sin(2*d*x + 2 *c))*C*a^4 - 128*(sin(d*x + c)^3 - 3*sin(d*x + c))*A*a^3*b + 96*(2*d*x + 2 *c + sin(2*d*x + 2*c))*B*a^3*b + 144*(2*d*x + 2*c + sin(2*d*x + 2*c))*A*a^ 2*b^2 + 576*(d*x + c)*C*a^2*b^2 + 384*(d*x + c)*B*a*b^3 + 96*(d*x + c)*A*b ^4 + 192*C*a*b^3*(log(sin(d*x + c) + 1) - log(sin(d*x + c) - 1)) + 48*B*b^ 4*(log(sin(d*x + c) + 1) - log(sin(d*x + c) - 1)) + 384*C*a^3*b*sin(d*x + c) + 576*B*a^2*b^2*sin(d*x + c) + 384*A*a*b^3*sin(d*x + c) + 96*C*b^4*tan( d*x + c))/d
Leaf count of result is larger than twice the leaf count of optimal. 802 vs. \(2 (281) = 562\).
Time = 0.39 (sec) , antiderivative size = 802, normalized size of antiderivative = 2.74 \[ \int \cos ^4(c+d x) (a+b \sec (c+d x))^4 \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\text {Too large to display} \]
integrate(cos(d*x+c)^4*(a+b*sec(d*x+c))^4*(A+B*sec(d*x+c)+C*sec(d*x+c)^2), x, algorithm="giac")
-1/24*(48*C*b^4*tan(1/2*d*x + 1/2*c)/(tan(1/2*d*x + 1/2*c)^2 - 1) - 3*(3*A *a^4 + 4*C*a^4 + 16*B*a^3*b + 24*A*a^2*b^2 + 48*C*a^2*b^2 + 32*B*a*b^3 + 8 *A*b^4)*(d*x + c) - 24*(4*C*a*b^3 + B*b^4)*log(abs(tan(1/2*d*x + 1/2*c) + 1)) + 24*(4*C*a*b^3 + B*b^4)*log(abs(tan(1/2*d*x + 1/2*c) - 1)) + 2*(15*A* a^4*tan(1/2*d*x + 1/2*c)^7 - 24*B*a^4*tan(1/2*d*x + 1/2*c)^7 + 12*C*a^4*ta n(1/2*d*x + 1/2*c)^7 - 96*A*a^3*b*tan(1/2*d*x + 1/2*c)^7 + 48*B*a^3*b*tan( 1/2*d*x + 1/2*c)^7 - 96*C*a^3*b*tan(1/2*d*x + 1/2*c)^7 + 72*A*a^2*b^2*tan( 1/2*d*x + 1/2*c)^7 - 144*B*a^2*b^2*tan(1/2*d*x + 1/2*c)^7 - 96*A*a*b^3*tan (1/2*d*x + 1/2*c)^7 - 9*A*a^4*tan(1/2*d*x + 1/2*c)^5 - 40*B*a^4*tan(1/2*d* x + 1/2*c)^5 + 12*C*a^4*tan(1/2*d*x + 1/2*c)^5 - 160*A*a^3*b*tan(1/2*d*x + 1/2*c)^5 + 48*B*a^3*b*tan(1/2*d*x + 1/2*c)^5 - 288*C*a^3*b*tan(1/2*d*x + 1/2*c)^5 + 72*A*a^2*b^2*tan(1/2*d*x + 1/2*c)^5 - 432*B*a^2*b^2*tan(1/2*d*x + 1/2*c)^5 - 288*A*a*b^3*tan(1/2*d*x + 1/2*c)^5 + 9*A*a^4*tan(1/2*d*x + 1 /2*c)^3 - 40*B*a^4*tan(1/2*d*x + 1/2*c)^3 - 12*C*a^4*tan(1/2*d*x + 1/2*c)^ 3 - 160*A*a^3*b*tan(1/2*d*x + 1/2*c)^3 - 48*B*a^3*b*tan(1/2*d*x + 1/2*c)^3 - 288*C*a^3*b*tan(1/2*d*x + 1/2*c)^3 - 72*A*a^2*b^2*tan(1/2*d*x + 1/2*c)^ 3 - 432*B*a^2*b^2*tan(1/2*d*x + 1/2*c)^3 - 288*A*a*b^3*tan(1/2*d*x + 1/2*c )^3 - 15*A*a^4*tan(1/2*d*x + 1/2*c) - 24*B*a^4*tan(1/2*d*x + 1/2*c) - 12*C *a^4*tan(1/2*d*x + 1/2*c) - 96*A*a^3*b*tan(1/2*d*x + 1/2*c) - 48*B*a^3*b*t an(1/2*d*x + 1/2*c) - 96*C*a^3*b*tan(1/2*d*x + 1/2*c) - 72*A*a^2*b^2*ta...
Time = 21.34 (sec) , antiderivative size = 4781, normalized size of antiderivative = 16.32 \[ \int \cos ^4(c+d x) (a+b \sec (c+d x))^4 \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\text {Too large to display} \]
(tan(c/2 + (d*x)/2)*((5*A*a^4)/4 + 2*B*a^4 + C*a^4 + 2*C*b^4 + 6*A*a^2*b^2 + 12*B*a^2*b^2 + 8*A*a*b^3 + 8*A*a^3*b + 4*B*a^3*b + 8*C*a^3*b) + tan(c/2 + (d*x)/2)^3*((4*B*a^4)/3 - 2*A*a^4 + 8*C*b^4 + 24*B*a^2*b^2 + 16*A*a*b^3 + (16*A*a^3*b)/3 + 16*C*a^3*b) - tan(c/2 + (d*x)/2)^7*(2*A*a^4 + (4*B*a^4 )/3 - 8*C*b^4 + 24*B*a^2*b^2 + 16*A*a*b^3 + (16*A*a^3*b)/3 + 16*C*a^3*b) + tan(c/2 + (d*x)/2)^9*((5*A*a^4)/4 - 2*B*a^4 + C*a^4 + 2*C*b^4 + 6*A*a^2*b ^2 - 12*B*a^2*b^2 - 8*A*a*b^3 - 8*A*a^3*b + 4*B*a^3*b - 8*C*a^3*b) - tan(c /2 + (d*x)/2)^5*(2*C*a^4 - (3*A*a^4)/2 - 12*C*b^4 + 12*A*a^2*b^2 + 8*B*a^3 *b))/(d*(3*tan(c/2 + (d*x)/2)^2 + 2*tan(c/2 + (d*x)/2)^4 - 2*tan(c/2 + (d* x)/2)^6 - 3*tan(c/2 + (d*x)/2)^8 - tan(c/2 + (d*x)/2)^10 + 1)) - (atan(((( B*b^4 + 4*C*a*b^3)*(12*A*a^4 + 32*A*b^4 + 32*B*b^4 + 16*C*a^4 + 96*A*a^2*b ^2 + 192*C*a^2*b^2 + 128*B*a*b^3 + 64*B*a^3*b + 128*C*a*b^3) + tan(c/2 + ( d*x)/2)*((9*A^2*a^8)/2 + 32*A^2*b^8 + 32*B^2*b^8 + 8*C^2*a^8 + 192*A^2*a^2 *b^6 + 312*A^2*a^4*b^4 + 72*A^2*a^6*b^2 + 512*B^2*a^2*b^6 + 512*B^2*a^4*b^ 4 + 128*B^2*a^6*b^2 + 512*C^2*a^2*b^6 + 1152*C^2*a^4*b^4 + 192*C^2*a^6*b^2 + 12*A*C*a^8 + 256*A*B*a*b^7 + 48*A*B*a^7*b + 256*B*C*a*b^7 + 64*B*C*a^7* b + 896*A*B*a^3*b^5 + 480*A*B*a^5*b^3 + 384*A*C*a^2*b^6 + 1184*A*C*a^4*b^4 + 240*A*C*a^6*b^2 + 1536*B*C*a^3*b^5 + 896*B*C*a^5*b^3))*(B*b^4 + 4*C*a*b ^3)*1i - ((B*b^4 + 4*C*a*b^3)*(12*A*a^4 + 32*A*b^4 + 32*B*b^4 + 16*C*a^4 + 96*A*a^2*b^2 + 192*C*a^2*b^2 + 128*B*a*b^3 + 64*B*a^3*b + 128*C*a*b^3)...